<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>确认订单 - 邦伴用户端</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <style>
    :root {
      --primary: #ff7e2d;
      --primary-light: #fff3ea;
      --border: #f0f0f0;
      --text-main: #222;
      --text-sub: #888;
    }
    
    body {
      font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
      background-color: #f8f8f8;
      color: var(--text-main);
    }
    
    .app-container {
      width: 375px;
      height: 812px;
      margin: 0 auto;
      background: #fff;
      position: relative;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
      overflow-y: auto;
    }
    
    .primary-color {
      color: var(--primary);
    }
    
    .primary-bg {
      background-color: var(--primary);
    }
    
    .primary-light-bg {
      background-color: var(--primary-light);
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-outline {
      border: 1px solid var(--primary);
      color: var(--primary);
    }
    
    .card {
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    
    .form-section {
      border-bottom: 8px solid #f8f8f8;
    }
  </style>
</head>
<body>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <div class="sticky top-0 z-10 bg-white border-b border-gray-100 px-4 py-3 flex items-center">
      <a href="shopping_cart.html" class="mr-2">
        <i class="fas fa-arrow-left text-lg"></i>
      </a>
      <h1 class="text-lg font-medium flex-1 text-center">确认订单</h1>
    </div>
    
    <!-- 地址信息 -->
    <div class="form-section p-4">
      <div class="flex items-center justify-between">
        <h2 class="font-medium">收货地址</h2>
        <a href="#" class="text-sm primary-color">更换 <i class="fas fa-chevron-right text-xs"></i></a>
      </div>
      
      <div class="bg-white border border-gray-200 rounded-lg p-3 mt-3">
        <div class="flex items-center mb-1">
          <span class="font-medium">张先生</span>
          <span class="text-sm text-gray-500 ml-4">13812345678</span>
        </div>
        <p class="text-sm text-gray-600">北京市朝阳区建国路88号现代城7号楼1单元801</p>
      </div>
    </div>
    
    <!-- 配送方式 -->
    <div class="form-section p-4">
      <div class="flex items-center justify-between">
        <h2 class="font-medium">配送方式</h2>
      </div>
      
      <div class="flex items-center justify-between mt-3">
        <div class="flex items-center">
          <i class="fas fa-truck text-gray-400 mr-2"></i>
          <span>快递配送</span>
        </div>
        <span class="text-sm text-gray-500">免邮费</span>
      </div>
    </div>
    
    <!-- 商品列表 -->
    <div class="form-section p-4">
      <div class="flex items-center justify-between">
        <h2 class="font-medium">商品信息</h2>
        <span class="text-sm text-gray-500">共4件</span>
      </div>
      
      <!-- 商家分组 -->
      <div class="mt-3">
        <div class="flex items-center mb-2">
          <i class="fas fa-store text-gray-400 mr-2"></i>
          <span class="text-sm">康复护理旗舰店</span>
        </div>
        
        <!-- 商品项 -->
        <div class="bg-white rounded-lg p-3 mb-3 flex">
          <div class="w-16 h-16 bg-gray-100 rounded-lg overflow-hidden mr-3">
            <img src="https://via.placeholder.com/80" alt="商品图片" class="w-full h-full object-cover">
          </div>
          <div class="flex-1">
            <h3 class="text-xs font-medium mb-1">老人专用血压计 家用上臂式全自动高精准</h3>
            <p class="text-xs text-gray-500 mb-1">规格：上臂式 | 白色</p>
            <div class="flex items-center justify-between">
              <span class="text-xs primary-color">¥199.00</span>
              <span class="text-xs text-gray-500">x1</span>
            </div>
          </div>
        </div>
        
        <div class="bg-white rounded-lg p-3 mb-3 flex">
          <div class="w-16 h-16 bg-gray-100 rounded-lg overflow-hidden mr-3">
            <img src="https://via.placeholder.com/80" alt="商品图片" class="w-full h-full object-cover">
          </div>
          <div class="flex-1">
            <h3 class="text-xs font-medium mb-1">老人防滑拐杖 可伸缩折叠轻便</h3>
            <p class="text-xs text-gray-500 mb-1">规格：标准版 | 黑色</p>
            <div class="flex items-center justify-between">
              <span class="text-xs primary-color">¥89.00</span>
              <span class="text-xs text-gray-500">x1</span>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 商家分组 -->
      <div class="mt-3">
        <div class="flex items-center mb-2">
          <i class="fas fa-store text-gray-400 mr-2"></i>
          <span class="text-sm">母婴用品专营店</span>
        </div>
        
        <!-- 商品项 -->
        <div class="bg-white rounded-lg p-3 mb-3 flex">
          <div class="w-16 h-16 bg-gray-100 rounded-lg overflow-hidden mr-3">
            <img src="https://via.placeholder.com/80" alt="商品图片" class="w-full h-full object-cover">
          </div>
          <div class="flex-1">
            <h3 class="text-xs font-medium mb-1">婴儿洗护套装 天然无刺激</h3>
            <p class="text-xs text-gray-500 mb-1">规格：6件套</p>
            <div class="flex items-center justify-between">
              <span class="text-xs primary-color">¥128.00</span>
              <span class="text-xs text-gray-500">x2</span>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 优惠券 -->
    <div class="form-section p-4">
      <div class="flex items-center justify-between">
        <h2 class="font-medium">优惠券</h2>
        <div class="flex items-center">
          <span class="text-sm primary-color mr-1">3张可用</span>
          <i class="fas fa-chevron-right text-xs text-gray-400"></i>
        </div>
      </div>
    </div>
    
    <!-- 支付方式 -->
    <div class="form-section p-4">
      <div class="flex items-center justify-between">
        <h2 class="font-medium">支付方式</h2>
        <div class="flex items-center">
          <span class="text-sm text-gray-500 mr-1">微信支付</span>
          <i class="fas fa-chevron-right text-xs text-gray-400"></i>
        </div>
      </div>
    </div>
    
    <!-- 发票信息 -->
    <div class="form-section p-4">
      <div class="flex items-center justify-between">
        <h2 class="font-medium">发票信息</h2>
        <div class="flex items-center">
          <span class="text-sm text-gray-500 mr-1">不开发票</span>
          <i class="fas fa-chevron-right text-xs text-gray-400"></i>
        </div>
      </div>
    </div>
    
    <!-- 订单备注 -->
    <div class="form-section p-4">
      <h2 class="font-medium mb-3">订单备注</h2>
      <textarea class="w-full border border-gray-200 rounded-lg p-3 text-sm" rows="2" placeholder="请输入订单备注信息"></textarea>
    </div>
    
    <!-- 价格详情 -->
    <div class="p-4">
      <div class="mb-3 flex justify-between">
        <span class="text-gray-600">商品金额</span>
        <span>¥544.00</span>
      </div>
      
      <div class="mb-3 flex justify-between">
        <span class="text-gray-600">运费</span>
        <span>+¥0.00</span>
      </div>
      
      <div class="mb-3 flex justify-between">
        <span class="text-gray-600">优惠券</span>
        <span class="primary-color">-¥30.00</span>
      </div>
      
      <div class="mb-3 flex justify-between">
        <span class="text-gray-600">会员折扣</span>
        <span class="primary-color">-¥10.00</span>
      </div>
      
      <div class="pt-3 border-t border-gray-100 flex justify-between">
        <span class="font-medium">实付金额</span>
        <span class="font-bold primary-color">¥504.00</span>
      </div>
    </div>
    
    <!-- 底部结算栏 -->
    <div class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-100 p-4 flex items-center justify-between" style="width: 375px; margin: 0 auto;">
      <div>
        <span class="text-sm text-gray-500">实付金额：</span>
        <span class="text-lg font-bold primary-color">¥504.00</span>
      </div>
      <button class="btn-primary px-8 py-2 rounded-full" id="submitOrder">提交订单</button>
    </div>
    
    <!-- 底部空间 -->
    <div class="pb-20"></div>
    
    <!-- 支付弹窗 -->
    <div class="fixed inset-0 bg-black bg-opacity-50 hidden flex items-center justify-center z-20" id="paymentModal">
      <div class="bg-white rounded-lg w-80 overflow-hidden">
        <div class="p-4 border-b border-gray-100">
          <h3 class="text-center font-medium">确认支付</h3>
        </div>
        <div class="p-6">
          <div class="text-center mb-4">
            <p class="text-sm text-gray-500 mb-2">订单金额</p>
            <p class="text-xl font-bold primary-color">¥504.00</p>
          </div>
          
          <div class="mb-4">
            <div class="flex items-center justify-between p-3 border rounded-lg mb-2">
              <div class="flex items-center">
                <i class="fab fa-weixin text-green-500 text-xl mr-3"></i>
                <span>微信支付</span>
              </div>
              <i class="fas fa-check-circle primary-color"></i>
            </div>
            
            <div class="flex items-center justify-between p-3 border rounded-lg">
              <div class="flex items-center">
                <i class="fab fa-alipay text-blue-500 text-xl mr-3"></i>
                <span>支付宝</span>
              </div>
            </div>
          </div>
          
          <button class="btn-primary w-full py-3 rounded-lg">确认支付</button>
          <button class="w-full py-3 text-gray-500 mt-2" id="cancelPayment">取消</button>
        </div>
      </div>
    </div>
    
    <!-- 支付成功弹窗 -->
    <div class="fixed inset-0 bg-white hidden flex flex-col items-center justify-center z-30" id="successModal">
      <div class="w-20 h-20 rounded-full bg-primary-light flex items-center justify-center mb-4">
        <i class="fas fa-check-circle text-4xl primary-color"></i>
      </div>
      <h3 class="text-xl font-medium mb-2">支付成功</h3>
      <p class="text-sm text-gray-500 mb-6">您的订单已支付成功</p>
      <div class="flex space-x-4">
        <a href="#" class="btn-outline px-6 py-2 rounded-full">查看订单</a>
        <a href="#" class="btn-primary px-6 py-2 rounded-full">返回首页</a>
      </div>
    </div>
  </div>

  <script>
    document.addEventListener('DOMContentLoaded', function() {
      const submitOrderBtn = document.getElementById('submitOrder');
      const paymentModal = document.getElementById('paymentModal');
      const cancelPaymentBtn = document.getElementById('cancelPayment');
      const successModal = document.getElementById('successModal');
      
      submitOrderBtn.addEventListener('click', function() {
        paymentModal.classList.remove('hidden');
        paymentModal.classList.add('flex');
      });
      
      cancelPaymentBtn.addEventListener('click', function() {
        paymentModal.classList.add('hidden');
        paymentModal.classList.remove('flex');
      });
      
      const confirmPaymentBtn = document.querySelector('.btn-primary.w-full');
      confirmPaymentBtn.addEventListener('click', function() {
        paymentModal.classList.add('hidden');
        paymentModal.classList.remove('flex');
        
        successModal.classList.remove('hidden');
        successModal.classList.add('flex');
        
        // 3秒后自动返回
        setTimeout(function() {
          window.location.href = 'index.html';
        }, 3000);
      });
    });
  </script>
</body>
</html> 